<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      html,
      body {
        height: 100%;
      }
      .parent {
        min-height: 100%;
        display: flex;
      }
      .child {
        background-color: red;
        width: 100%;
      }
    </style>
  </head>
  <body>
    <div class="parent">
      <div class="child">
        <div class="content">子元素内容</div>
      </div>
    </div>
  </body>
</html>
